<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport"
        content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>title</title>
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <style>
        html {
            font-size: 20px !important;

        }

        html,
        body {
            background-color: #fff !important;
        }

        header {
            height: 6rem;
            text-align: center;
        }

        #back {
            position: absolute;
            left: 0.65rem;
            top: 2rem;
        }

        .qietab {
            height: 2rem;
            line-height: 2rem;
            font-size: 0.7rem;
            color: #565656;
            bottom: 0;
            width: 100%;
            position: absolute;
        }

        .qietab span {
            display: inline-block;
            width: 49%;
            border-top: 1px solid #E8E8E8;

        }

        .title {
            font-size: 0.8rem;
            color: #303030;
            margin-left: -0.5rem;
            margin-top: 0.5rem;
        }

        .tab_active {
            color: #FD6150;
        }
    </style>
</head>

<body>
    <header class="hd"  id="app" v-cloak>
        <a id="back" class="">
            <img src="../image/icon_back.png" style="width: 0.45rem;height: 0.8rem;margin-left: 0.7rem;" alt="">
        </a>
        <div class="title">{{title}}</div>

        <div class="qietab"><span class="tab_active" onclick="qieTab(this,0)">病例</span><span onclick="qieTab(this,1)"
                style="border-left: 1px solid #E8E8E8;">咨询</span></div>
    </header>



</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/zepto.min.js"></script>
<script type="text/javascript" src="../script/hb.js"></script>
<script type="text/javascript" src="../script/vue.js"></script>
<script type="text/javascript">
    apiready = function () {
        hb_ready()
        app.title = api.pageParam.title
        hb_openframeby_auto('zixun_bingli_frm', api.pageParam)
    };

    var app = new Vue({
        el: "#app",
        data: {
            title: ""
        }
    })

    //病例和咨询的tab切换
    function qieTab(obj, index) {
        $('.tab_active').removeClass('tab_active');
        $(obj).addClass('tab_active')

        api.sendEvent({
            name: 'show_chat',
            extra: {
                index: index,
            }
        });

        // if (index == 0) {
        //     // 去病例
        //     hb_openframeby_auto('zixun_bingli_frm', api.pageParam)
        // } else {
        //     // 去咨询
        //     hb_openframeby_auto('zixun_bingli_zixun_frm', api.pageParam)
        // }
    }
</script>

</html>